package com.ruoyi.common.utils;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.tree.Tree;
import cn.hutool.core.lang.tree.TreeNode;
import cn.hutool.core.lang.tree.TreeUtil;

import java.util.List;

public class TreeUtils {
    public static  List<Tree<String>> build( List<TreeNode<String>> nodeList,String parentId) {
        // 0表示最顶层的id是0
        List<Tree<String>> treeList = TreeUtil.build(nodeList, parentId);
        return treeList;
    }
}